Skip to content

Conversation

@effigies
Copy link
Contributor

In #112 we added axis_codes to the nifti_header context, which unwittingly made the whole header appear unreadable for improper quaternions (the norm of the quaternion should be 1; if the norm of the explicit components exceeds 1, the implicit component can't be calculated). Raising an error in this case is not worth it, since it only enables a warning check.

I've seen two reports in the last week about surprising NIFTI_HEADER_UNREADABLE errors (OpenNeuro support ticket and https://neurostars.org/t/bids-validator-error-nifti-header-unreadable/34423), which result from this.

@codecov
Copy link

codecov bot commented Nov 24, 2025

Codecov Report

❌ Patch coverage is 96.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.03%. Comparing base (c8fcef3) to head (272299b).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/files/nifti.ts 96.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #297      +/-   ##
==========================================
+ Coverage   86.99%   87.03%   +0.03%     
==========================================
  Files          50       50              
  Lines        3721     3724       +3     
  Branches      610      613       +3     
==========================================
+ Hits         3237     3241       +4     
+ Misses        475      474       -1     
  Partials        9        9              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@effigies effigies changed the title fix:Set nifti_header.axis_codes to null for bad qforms, rather than error fix: Set nifti_header.axis_codes to null for bad qforms, rather than error Nov 24, 2025
@effigies effigies requested a review from rwblair November 24, 2025 17:46
@rwblair rwblair merged commit 241728d into bids-standard:main Nov 24, 2025
36 of 37 checks passed
@effigies
Copy link
Contributor Author

Just a note that there's a related upstream fix: rii-mango/NIFTI-Reader-JS#56

@effigies effigies deleted the fix/bad-qform branch November 25, 2025 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants